import Mock from '../../mockjs/dist/mock-min.js';

let gift = [
	{
		key: "/gift/page",
		method: "get",
		param: {
				current: 1,
				size: 10,
				name: "",
				statu: true,
			},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					'current': 0,
					'size': 10,
					'pages': 6,
					'total': 55,
					"records|10": [{
						'id': '@increment(1)',
						'name': '@cparagraph()',
						'point|1-3': /[1-9]/,
						'statu': '@boolean()',
						'stock|3-5': /[1-9]/,
						'cover|1': [
							"https://bpic.588ku.com/original_origin_min_pic/18/05/06/84ba2ae50b7fc24cfd5d6031d730d153.jpg",
							"https://bpic.588ku.com/original_origin_min_pic/19/06/17/1c3ab4ae6661ef3085b4045fd173ad6b.jpg",
							"https://bpic.588ku.com//back_origin_min_pic/22/10/31/795285179488e8478f87138d7ec3f393.jpg",
							"https://bpic.588ku.com//back_origin_min_pic/22/10/28/471bf0409a1839613fc5aa1cae1473ac.jpg",
						],
					}]
				}
			});
		}
	},
	
	{
			key: "/gift/info",
			method: "get",
			param: {
				id: 0,
			},
			data: Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					'gift': {
						'id': '@increment(1)',
						'giftName': '@cname()',
						'point': '@increment(2)',
						'statu': '0',
						'cover': '@image("60x60")',
						'tel|11': /[0-9]/,
						'ct': '@datetime("yyyy-MM-dd hh:mm:ss")',
						'stock': /[0-9]/
					},
					'giftItems|3-8': [{
						'id': '@increment(1)',
						'giftId': '@increment(1)',
						'giftName': '@cname()',
						'count': '@increment(1)',
						'total': '@increment(2)',
						'giftCover': '@image("60x60")',
					}, ]
				}
			})
		},
	
	{
		key: "/gift/addorder",
		method: "post",
		param:{
			id:0,
			gifts: {
				giftId:"",
				giftName: "",
				giftPoint: 0,
				count:"",
			},
		},
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': "",
			});
		}
	},
	{
		key: "/gift/info",
		method: "put",
		param: {
			id: 0,
			statu: '0',
			product: {
				name: "",
				point: 0,
				cover: "",
				statu: 0,
				stock: 0
			},
		},
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': "",
			});
		}
	},
	{
		key: "/gift/newgift",
		method: "post",
		param:{
			id:0,
			statu:'0',
			product: {
				name: "",
				point: 0,
				cover: "",
				statu: 0,
				stock:0
			},
		},
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': "",
			});
		}
	},
	{
		key: "/gift",
		method: "delete",
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {},
			});
		}
	},
];
export default gift;
